package com.mhc.suzuki.manager;

import com.subaru.common.query.PageResult;
import com.mhc.suzuki.dal.model.CustomerDO;
import com.mhc.suzuki.dal.query.CustomerQuery;

import java.util.List;
import java.util.Map;


/**
 * Manager for Customer.
 */
public interface CustomerManager {
    /**
     * query count by query condition.
     */
    int countByQuery(CustomerQuery query);

    /**
     * delete by query condition.
     */
    int deleteByQuery(CustomerQuery query);

    /**
     * delete by primary key.
     */
    int deleteByPrimaryKey(CustomerDO record);

    /**
     * insert selective.
     */
    long insertSelective(CustomerDO record);

    /**
     * select by query condition.
     */
    List<CustomerDO> selectByQuery(CustomerQuery query);


    /**
     * select by query condition with page.
     */
    PageResult<CustomerDO> selectByQueryWithPage(CustomerQuery query);

    /**
     * select by primary key.
     */
    CustomerDO selectByPrimaryKey(Long id);

    /**
     * update by query condition selective.
     */
    int updateByQuerySelective( CustomerDO record,  CustomerQuery query);

    /**
     * update by query condition.
     */
    int updateByQuery(CustomerDO record, CustomerQuery query);

    /**
     * update by primary key selective.
     */
    int updateByPrimaryKeySelective(CustomerDO record);

    /**
     * 条件查询更换购车人后的主贷人信息
     * @param map
     * @return
     */
    CustomerDO getExchangedBuyer(Map<String, Object> map);

    /**
     * 条件查询更换购车人后的共同购车人信息
     * @param map
     * @return
     */
    CustomerDO getExchangedCommonBuyer(Map<String, Object> map);
}